package com.qcby.service.Impl;

import com.qcby.dao.SaleMapper;
import com.qcby.model.Change;
import com.qcby.model.Sell;
import com.qcby.service.SaleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Tom
 * @Date: 2021/07/22/15:53
 * @Description:
 */
@Service
public class SaleServiceImpl implements SaleService {
    @Autowired
    private SaleMapper saleMapper;

    @Override
    public void updataByPriceAc(Integer id,Integer price, Integer currentPrice) {
        saleMapper.updateByPriceAc(id,price,currentPrice);
    }

    @Override
    public void insert(Sell sell) {
        saleMapper.insertBySell(sell);
    }

    @Override
    public Integer selectPriceById(Integer id) {
        return saleMapper.selectPriceById(id);
    }

    @Override
    public Integer selectUserIdById(Integer id) {
        return saleMapper.selectUserIdById(id);
    }

    @Override
    public Integer selectEquipIdById(Integer id) {
        return saleMapper.selectEquipIdById(id);
    }

    @Override
    public void updataByUserId(Change swap) {
        saleMapper.updataByUserId(swap);
    }
}
